<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>显示不同的内容</title>
    <style>
      .box {
        width: 130px;
        margin: 0 auto;
        box-sizing: border-box;
      }
      .left-box {
        float: left;
      }
      .item {
        width: 50px;
        height: 30px;
        line-height: 30px;
        text-align: center;
        border: 1px solid pink;
        background-color: #fff8f5;
        box-sizing: border-box;
      }
      .item:hover {
        background-color: #f03416;
        color: #ffffff;
        cursor: pointer;
      }
      .right-box {
        float: left;
        width: 80px;
        height: 120px;
        border: 1px solid skyblue;
        box-sizing: border-box;
      }
      .itemr {
        display: none;
      }
    </style>
    <script src="lib/jQuery-v3.6.0.min.js"></script>
  </head>
  <body>
    <div class="box">
      <div class="left-box">
        <div class="item clothes">衣服</div>
        <div class="item shoes">鞋子</div>
        <div class="item umbrella">雨伞</div>
        <div class="item computer">电脑</div>
      </div>
      <div class="right-box">
        <div class="itemr one">衣服</div>
        <div class="itemr two">鞋子</div>
        <div class="itemr three">雨伞</div>
        <div class="itemr four">电脑</div>
      </div>
    </div>

    <script>
      $(function () {
        $('.clothes').mouseover(function () {
          $('.one').css('display', 'block')
        })
        $('.clothes').mouseout(function () {
          $('.one').css('display', 'none')
        })

        $('.shoes').mouseover(function () {
          $('.two').css('display', 'block')
        })
        $('.shoes').mouseout(function () {
          $('.two').css('display', 'none')
        })

        $('.umbrella').mouseover(function () {
          $('.three').css('display', 'block')
        })
        $('.umbrella').mouseout(function () {
          $('.three').css('display', 'none')
        })

        $('.computer').mouseover(function () {
          $('.four').css('display', 'block')
        })
        $('.computer').mouseout(function () {
          $('.four').css('display', 'none')
        })
      })
    </script>
  </body>
</html>
